package com.info.zhiduoduo.repository.entity.maker;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 *  受托人创客的企业支付宝转账支付等产生的业务流水记录表
 * </p>
 *
 * @author bob
 * @since 2021-07-11
 */
@Data
@Accessors(chain = true)
@TableName("zdd_maker_alipay_account_flow")
public class MakerAlipayAccountFlow extends Model<MakerAlipayAccountFlow> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 订单编号
     */
    @TableField("order_no")
    private String orderNo;
    /**
     * 受托人创客id
     */
    @TableField("entrustee_id")
    private Integer entrusteeId;
    /**
     * 受托人资金记账本id, 支付宝系统的id
     */
    @TableField("account_book_id")
    private String accountBookId;
    /**
     * 业务类型 1:收到委托人转账 2:代付支出 3:退款给委托人
     */
    private Integer type;
    /**
     * 流水金额
     */
    private BigDecimal amount;
    /**
     * 操作前记账本余额
     */
    @TableField("prev_amount")
    private BigDecimal prevAmount;
    /**
     * 操作后记账本余额
     */
    @TableField("after_amount")
    private BigDecimal afterAmount;
    /**
     * 流水备注
     */
    private String remark;
    /**
     * 流水时间
     */
    @TableField("flow_time")
    private Date flowTime;
    /**
     * 操作人id
     */
    private Integer adminid;
    private Date createtime;
    private Date updatetime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
